﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NLog;
using System.Web.UI.HtmlControls;

namespace KBVault.Web.Infrastructure
{
    public class KBVaultPublicPage : KBVaultBasePage
    {
               
        public bool IsAuthorized
        {
            get
            {
                return (HttpContext.Current.User != null) && HttpContext.Current.User.Identity.IsAuthenticated;
            }
        }

        public void SetPageTitle(string pageTitle)
        {
            (this.Master as SiteMaster).PageTitle = pageTitle;
        }

        public void SetPageDescription(string pageDescription)
        {
            (this.Master as SiteMaster).MetaDescription = "\""+pageDescription+"\"";
        }

        public void SetPageTags(string pageTags)
        {
            (this.Master as SiteMaster).MetaTags = "\""+pageTags+"\"";
        }
        public KBVaultPublicPage()
            : base()
        {
            Load += Page_Load;
        }

        protected new void Page_Load(object o, EventArgs e)
        {
            base.Page_Load(o, e);           
        }
    }
}